﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Security.Cryptography;
using System.IO;
using System.Net;
using System.Configuration;
using System.Text.RegularExpressions;
using System.Net.Mail;
using System.Text;
namespace TDT_Project.classes
{
    public class cls_config
    {
        private static string connstr = ConfigurationManager.ConnectionStrings["SQlConnection"].ToString();

        static public string ConnectionString
        {
            get
            {
                return connstr;
            }
        }
        public string PasswordEncrypt(string plainText)
        {
            byte[] data, output;
            var encoder = new UTF8Encoding();
            var hasher = new MD5CryptoServiceProvider();
            data = encoder.GetBytes(plainText);
            output = hasher.ComputeHash(data);
            return BitConverter.ToString(output).Replace("-", "").ToLower();
        }
    }
}